#pragma once

#ifndef __CORE_compile_time_utils_H__
#define __CORE_compile_time_utils_H__

#include "FLOW_core/namespace.h"

namespace CORE
{
	//! Compile time if
	template< bool_t condition, typename WhenTrueType, typename WhenFalseType >
	struct ct_if;

	template< typename WhenTrueType, typename WhenFalseType >
	struct ct_if< false, WhenTrueType, WhenFalseType >
	{
		typedef WhenFalseType result;
	};

	template< typename WhenTrueType, typename WhenFalseType >
	struct ct_if< true, WhenTrueType, WhenFalseType >
	{
		typedef WhenTrueType result;
	};

	//!Pointer type determination
	template< typename CheckedType >
	struct is_pointer
	{
		static const bool_t value = false;
	};

	template< typename CheckedType >
	struct is_pointer< CheckedType* >
	{
		static const bool_t value = true;
	};

	//! Pointer type removing
	template< typename PointerType >
	struct remove_pointer
	{
		typedef PointerType type;
	};

	template< typename PointerType >
	struct remove_pointer< PointerType* >
	{
		typedef PointerType type;
	};

}; //end namespace CORE

#endif
